
import service from '../utils/request';
// 推荐最新音乐,通过param可以选择华语，欧美等
export function getNewSong(param) {
  return service.get('/top/song?type='+param);
}

//获取精品歌单
export function getHighqualitySongLis() {
  return service.get('/top/playlist/highquality');
}


//获取歌单的分类标签     
export function getSongListTags() {
  return service.get('/playlist/highquality/tags');
}
//获取歌单
export function getSongList({ cat = '全部', limit = 10 }) {
  return service.get(`/top/playlist/highquality?cat=${cat}&limit=${limit}`);
}
//获取歌单的详细歌曲
export function getSongListContent(id) {
  return service.get('/playlist/detail?id='+id);
}
//获取排行榜的歌曲
export function getSongRanking() {
  return service.get('/toplist/detail');
}
//获取歌曲的Url
export function getSongUrl(id){
  return service.get('/song/url?id='+id)
}
//获取歌曲详情
export function getSongDetail(ids){
  return service.get('/song/detail?ids='+ids)
}
//获取歌手列表的歌手
export function getSingerList({type=-1,area=-1,initial='-1'}){
  return service.get(`/artist/list?type=${type}&area=${area}&initial=${initial}`)
}
//获取歌手的热门歌曲50首
export function getTopSongs(id){
  return service.get('/artist/top/song?id='+id)
}
//获取歌手专辑
export function getSingerAlbun(id){
  return service.get(`/artist/album?id=${id}&limit=5`)
}
//获取专辑内容
export function getSingerAlbunContent(id){
  return service.get(`/album?id=${id}`)
}

/// 专辑动态信息
export function getSingerAlbumMes(id){
  return service.get(`album/detail/dynamic?id=${id}`)
}

//获取歌手的MV
export function getSingerMV(id){
  return service.get(`/artist/mv?id=${id}`)
}

//获取mv详细信息
export function getMVDetails(id){
  return service.get(`/mv/detail?mvid=${id}`)
}

//获取mv地址
export function getMVUrl(id){
  return service.get(`/mv/url?id=${id}`)
}
//获取歌手描述
export function getSingerDes(id){
  return service.get(`/artist/desc?id=${id}`)
}
//获取歌手详情
export function getSingerDetails(id){
  return service.get(`/artist/detail?id=${id}`)
}

//搜索
export function search(keyword,type){
  return service.get(`/cloudsearch?keywords=${keyword}&type=${type}`)
}

//歌词
export function getLyric(id){
  return service.get(`/lyric?id=${id}`)
}


//歌手的全部歌曲
export function getAllSongs(id){
  return service.get(`/artist/songs?id=${id}`)
}

//推荐新音乐
export function recommendSongs(){
  return service.get('/personalized/newsong?limit=12')
}

// 推荐歌单
export function recommendSongList(){
  return service.get('/personalized?limit=10')
}

//推荐mv
export function recommendMV(){
  return service.get('/personalized/mv')
}